package com.zty.user.designPattern.abstractFactoryPattern.easy;

/**
 * @Author ZTY
 * @Description 他要知道现在有哪些工厂
 * @Date 2:52 2023-12-15
 **/

public class FactoryProducer {
    public static AbstractFactory getFactory(String choice) {
        if (choice.equalsIgnoreCase("SHAPE")) {
            return new ShapeFactory();
        } else if (choice.equalsIgnoreCase("COLOR")) {
            return new ColorFactory();
        }
        return null;
    }
}
